home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
comm
/
eds_old.zip
/
EDS-OLD.DOC
next >
Wrap
Text File
|
1996-10-24
|
28KB
|
697 lines
ED'S OLDMOVES TO PGN
Conversion Program
version 1.1
by
Edward D. Collins
Welcome to Ed's OLDMOVES TO PGN Conversion Program - a utility to
convert Internet played chess games in this format: (hereafter
called the 'oldmoves' format)
Casperov (1714) vs. EdCollins (1757) --- Sun Sep 29, 1:06 CDT 1996
Rated Blitz match, initial time: 2 minutes, increment: 12 seconds.
Move Casperov EdCollins
---- ---------------- ----------------
1. d4 (0:06) Nf6 (0:03)
2. Nf3 (0:02) g6 (0:06)
3. Bg5 (0:01) Bg7 (0:02)
4. e3 (0:01) O-O (0:02)
5. Bd3 (0:01) d6 (0:08)
6. Bxf6 (0:04) Bxf6 (0:06)
7. h4 (0:01) Bg4 (0:08)
8. etc.
...to this, the standard PGN format:
[Event "Rated Blitz Match"]
[Site "The Internet"]
[Date "1996.09.29"]
[Round "-"]
[White "Casperov"]
[Black "EdCollins"]
[Result "0-1"]
1. d4 Nf6 2. Nf3 g6 3. Bg5 Bg7 4. e3 0-0 5. Bd3 d6 6. Bxf6 Bxf6
7. h4 Bg4 8. etc.
What is PGN?
────────────
PGN is short for "Portable Game Notation", a standard designed for
the representation of chess game data using ASCII text files. PGN
is structured for easy reading and writing by human users and for
easy parsing and generation by computer programs.
How can this program help me?
─────────────────────────────
Most commercial chess programs and databases have the ability to
read files in the PGN format or have conversion programs which
can convert PGN files to the type of file that they use. With
this program you'll be able to load and study your Internet games
almost immediately after playing them!
Which files are required to run this program?
─────────────────────────────────────────────
Techincally, none! The executable file (EDS-OLD.EXE) is the only
file you need. The first time the program runs, it will create an
'option' file (EDS-OLD.OPT) which stores your program options and
colors. Each subsequent time you run the program this file will
automatically be loaded as long as it exists in the current
directory.
Which file(s) does the program create?
──────────────────────────────────────
Each time you run the program, in addition to the PGN file that is
created, (which you yourself will name) a 'results' text file
(EDS-OLD.RSL) will be generated which contains information on the
oldmoves.log file that you just converted.
Alright, I've converted a file. Now what?
──────────────────────────────────────────
Now the choice is up to you. If your favorite chess playing
program/database has the option of loading PGN formatted games,
you can simply load this newly created PGN file. Otherwise you
may have to use another conversion program to convert the PGN file
to yet a different format.
How do I use the program?
─────────────────────────
I tried very hard to make the interface as intuitive as possible.
Only time will tell whether I succeeded or not! Generally, you
can use the program in one of two ways:
1) By typing EDS-OLD at the DOS prompt. This method will a
display a brief title screen and then the Options screen which
is where you will enter or select such things as...
the name of your input and output files
the choice of overwriting of appending the output file
the type of games that you wish to convert (BLITZ,
STANDARD, RATED, etc.)
other criteria to exclude or include certain games
2) By typing EDS-OLD <option file> at the DOS prompt where
'option file' is the name of the options file that you wish to
use. This method will NOT display the title screen OR the
options screen. It will simply convert the specified input
file using the choices and options that are currently in your
specified option file.
Why would I want to use this 2nd method?
────────────────────────────────────────
It works well if your options do not usually change and you wish
to use the program as part of a batch file. For example after
logging off from the Internet Chess Clubs, and then logging off
from my local Internet Provider, if I wish to review one or more
games that I just played I simply type 'review '. Review is a
simple batch file, located in my path, which...
Copies my ZIICS oldmoves.log file to my chess\ca\temp directory.
Runs this conversion program to convert the files to PGN format.
Runs another conversion program which converts this PGN file to a
file (several files actually) that Chess Assistant can read.
Loads Chess Assistant
These four steps take just a few seconds so moments after logging
off I can be reviewing these past games! A copy of this batch
file appears later in this documentation file for those of you may
not be familar with DOS batch files and would like help in
setting up your own.
I've heard about STR. What is this?
────────────────────────────────────
There is a set of tags defined for mandatory use for archival
storage of PGN data. This is the STR (Seven Tag Roster). The
interpretation of these tags is fixed as is the order in which
they appear. Although the definition and use of additional tag
names and semantics is permitted and encouraged when needed, the
STR is the common ground that all programs should follow for
public data interchange.
The seven tag names of the STR are (in order):
1) Event (the name of the tournament or match event)
2) Site (the location of the event)
3) Date (the starting date of the game)
4) Round (the playing round ordinal of the game)
5) White (the player of the White pieces)
6) Black (the player of the Black pieces)
7) Result (the result of the game)
A single blank line appears after the last of the tag pairs to
conclude the tag pair section. This helps simple scanning
programs to quickly determine the end of the tag pair section
and the beginning of the movetext section.
Can you explain the different options on your Options screen?
─────────────────────────────────────────────────────────────
Sure. Most are self-explanatory already.
INPUT FILENAME - This is the name of the file that you wish to
convert. It can have any valid DOS name that
you wish as long as the file is in the proper
format that the conversion program is looking
for. If the file is not in the current
directory (the directory that the program is
run from), simply include the full path.
OUTPUT FILENAME - This is the name of the PGN output file that
the program will create. If the file already
exists then the new data will either be
appended to or overwritten depending upon the
choice for the next option.
IF THE PGN OUTPUT FILE ALREADY EXISTS <overwrite it>
<append to it>
- choosing overwrite will, in effect, erase the
current contents of this PGN file. Choosing
append will add the newly converted games to
the end of it.
INCLUDE TIME/INCREMENT IN HEADER?
This option gives the user the choice of
whether to include the time and increment of
the game in the EVENT field of the header.
SITE TEXT - This option gives the user the choice of
exactly what he/she would like to use as the
name of the site text. If the only Internet
site that you frequent is ICC, then you may
wish to simply use ICC, etc. If you play at
both sites, you may wish this field to say
something like THE INTERNET. It's up to you.
IF THE YEAR IS UNKNOWN, USE BIOS YEAR?
- In reviewing several of my games that I've
played over the past year, I noticed that many
of these games do not have the year that the
game was played in as part of the header. This
option allows the program to make it's 'best
guess' i.e. to simply use the year from it's
own internal date. Otherwise, 'question marks'
will appear in place of the unknown year, which
is a PGN standard.
INCLUDE PLAYERS RATING WITH NAME <in ELO Field>
<with name>
<not at all>
- I've noticed many PGN files have a field called
WhiteELO and BlackELO. Although not one of
the mandatory STR's, this tag appears to be very
common. I've given the user the option of
including this tag. Some users may simply wish
to see the players rating right along side
their handle. If so, they would choose 'with
name'. Others may not wish to see the players
rating at all. It's your choice.
CONVERT BLITZ,
BULLET,
LIGHTNING,
STANDARD,
RATED,
UNRATED,
WILD games
- These seven options all have a possibility
of either a 'yes' or a 'no'. The program will
either convert the game or it will ignore it.
It is useful if you just wish to compile a PGN
file of, say, just your blitz games while
ignoring all others.
INCLUDE WINBY FIELD IN HEADER?
- One of the conversion programs that I
downloaded (see Conversion Program #3 below)
did have a neat idea. The author noted that
many of the final positions of his games did
not reflect the actual result. This option
gives the user a choice of a Header Field called
WinBy. Although this is not a normal PGN tag,
most all programs that read PGN files will
treat additional tags as comments. This will
clear up some doubts as to what happened in the
game.
CONVERT GAMES PLAYED ON OR AFTER ____.__.__
- If you're just interested in creating a PGN
file of, say, last weeks games, then enter last
weeks date in the format yyyy.mm.dd. The
program will check the date of the game played
and only if it is equal to or later than the
date that you entered will it convert the game.
Note: Entering 0000.00.00 is obviously not a
valid date. However this is equivalent to
saying "Please convert all the games."
Also, here's a neat little trick. If you enter
9999.99.99 that is the equvalent of entering
TODAY'S date, whatever that may be. This is
handy in the batch file that I run. At times I
just wish to review the games that I just
played. So I use a batch file with 9999.99.99
as this date which just converts the games that
I played that day.
IGNORE ALL GAMES WITH LESS THAN x NUMBER OF MOVES
- Sometimes games are aborted after just a move
or two. Most of the time these are games that
you will probably not wish to convert. Here
you can filter out these games by typing in the
minimum number of moves that a game must be
before it will be converted. For example if
you wish to ignore all games with fewer than
five moves, enter '5'.
IGNORE ALL GAMES WITH MORE THAN x NUMBER OF MOVES -
- Some players may wish to compile a collection
of their 'miniatures.' This option will allow
that. Simply enter, for example, 25 and all
games that have 26 or more moves will not be
converted.
IGNORE GAMES WHERE THE MINIMUM RATING IS LESS THAN _____
- If you enjoy observing MASTER games, you may
wish to compile a PGN file of just these games.
You can do so by entering 2200. This will
ignore any games in your oldmoves.log file
where either of the players has a rating of
2199 of below.
EXCLUDE ALL GAMES OTHER THAN ONES PLAYED BY
- If you leave this field blank, the conversion
process will convert all the games. If you're
just interested on converting the games that
YOU played (and not the ones that you may have
observed - NOTE: I'm currently using ZIICS with
the option to automatically save all the games
that I play OR observe) simply enter your
handle. Case is irrelevant. Entering
eDcOlLiNs will convert just the games that I
have played, even though my handle on FICS is
EdCollins. If you have a different handle on
another server or enjoy playing unrated games
under a different name on the same server, you
can enter 'first-handle OR second-handle'. If
either handle is found, the program will
convert it. Finally if you're just interested
in compiling a PGN file of just your games
against a single player (let's say a computer
that you like to play against who always seems
to get the better of you) you can enter
'your-handle AND other-handle'. This will
ignore all the games EXCEPT the ones played by
you and this opponent!
Okay, how do I change these options to MY preferences?
──────────────────────────────────────────────────────
Simple. For the options which require either a yes or no answer,
simply hit either the spacebar or the Enter key to toggle the
selection. Also, you can hit either the 'y' key, to change a
no to a yes, or hit the 'n' key, to change a yes to a no.
For the options that require some user imput, first...
... again hit the spacebar or Enter key
... then simply start typing your text. Hit ENTER when
finished.
The results file reported some errors. How do I correct these?
───────────────────────────────────────────────────────────────
You'll have to load your oldmoves file into any ASCII text editor
(Multi-Edit, Q-Edit, the DOS Editor, etc.), find the game in
question and clean up the game yourself. The oldmoves file is
required to be in a specific format and although I accounted for
many ambiguities, it is impossible to account for all possible
errors.
It takes so long to convert my file? Is there anything I can do?
─────────────────────────────────────────────────────────────────
The larger that your oldmoves file is, the longer it is going to
take to read and convert it. You may wish to break it down into
several smaller files. What I like to do is, on the first of each
month, simply rename my oldmoves.log file to, for example,
1996-09.LOG. This is the name that I would give the file on the
first of October in '96 since it indicates that this oldmoves.log
file is a collection of my games played during September.
I have a very old oldmoves file which doesn't seem to be
converting correctly. Why is this? ┌───────────────────
────────────────────────────────────┘
It is possible that the format is different than the one that the
program is looking for. This program is specifically looking for
an oldmoves file in this type of format:
EdCollins (1765) vs. Flare (1750) --- Wed Oct 9, 1:06 CDT 1996
Rated Blitz match, initial time: 2 minutes, increment: 12 seconds.
Move EdCollins Flare
---- ---------------- ----------------
1. f4 (0:02) e5 (0:03)
2. g4 (0:02) Qh4 (0:01)
{White checkmated} 1-0
where...
...the players name, rating, and date information appear first,
as in the example
...The match and time information appear next also as in the
above example
...White's name and moves begin in column 7
...Black's name and moves begin in column 26
...The result information appears immediately after the game
score as shown above
I don't care for the default screen colors. Can I change them?
───────────────────────────────────────────────────────────────
Certainly! As it is with all the programs I write, I give the
user full control over just about each and every color on the
screen. The function keys F4 thru F10 toggle through the 16
available colors for each of the following 'objects.'
F4 - the box shadow
F5 - the highlighted option box
F6 - the highlighted text
F7 - the highlighted box text
F8 - the text in the option boxes
F9 - the option boxes themselves
F10 - the background
The function key by itself toggles the colors forward. The key
combination 'ALT + function key' toggles the colors backward. The
options file will save these screen colors so that each subsequent
time that you run the program your preferred screen colors will
appear.
Does this program alter my oldmoves file in any way?
────────────────────────────────────────────────────
No, not at all. This file is simply opened for INPUT and read
sequentially. It will be exactly the same as it was before the
program was run.
Is there a registration fee to use this program?
────────────────────────────────────────────────
No! This program is freeware. There is no registration fee or
"trial period" whatsoever. Feel free to keep this program and
use it was often as you like. If you do use it, all I ask is that
you drop me a line and let me know! I'd appreciate hearing
from you.
If you upload it to any Internet Site, computer bulletin board,
etc., PLEASE include this documentation file.
I've noticed that there are other conversion programs out there
that convert oldmoves files to the PGN format too. Why should I
use this one? ┌─────────────────────────────────────────────────
──────────────┘
Because so far it's the best! Seriously. I started writing this
program before I realized that there WERE conversion programs
already available. However after downloading them I quickly
discovered that they...
offered no options at all
had no interface of any kind
all converted my files oldmoves files INCORRECTLY !!
One conversion program admitted that only the oldmoves files from
FICS had been tested. Sure enough, some of my games from other
servers did not convert properly. One conversion program used the
text 'Internet at some ICS server' for the SITE field in the
Header. I didn't care for this. Another program entered question
marks for the 'year' when the year was not included in the
oldmoves file. (My program offers the option of using the BIOS
year.) Etc., etc. So seeing the limitations of these other
programs gave me some incentive to finish writing my own.
In fact, here is a small comparison of some of the other
conversion programs with this one. Because I do not wish to
embarrass the authors of these programs in any way, I will simply
call these programs Conversion Program #1, Conversion Program #2,
and Conversion Program #3.
Conversion Program #3 ─────────────────────┐
Conversion Program #2 ────────────────────┐ │
Conversion Program #1 ───────────────────┐ │ │
Ed's OLDMOVES TO PGN Conversion Program ─┐ │ │ │
│ │ │ │
│ │ │ │
Features / Options │ │ │ │
------------------ │ │ │ │
offers the user a choice of either an YES no no no
interface or command line parameters
allows the user to name the input file YES no YES YES
whatever he/she wishes
allows the PGN output file to be YES no no YES
appended to, if desired
allows the user to change the screen YES n/a n/a n/a
colors
allows the user to fill in the SITE YES no no no
Header as he/she sees fit
allows the user the option of filling YES no no no
in the year with the DOS BIOS year
allows the user the choice of creating YES no no no
an ELO rating field
allows the user the choice of converting YES no no no
certain selected games?
allows the user the choice of creating YES no no no
a 'WinBy' field
comes with a detailed documentation file YES no no no
adds the customary '#' sign for games YES no no YES
which end in checkmate
allows the user the choice of converting YES no no no
more than one file, without having to
reload the progam into memory each time
gives the user a report on the games YES no no no
from the input file
politely updates the screen while the YES YES no no
conversion process is taking place so
you KNOW SOMETHING IS HAPPENING
does the program even work? YES (a) (b) (c)
(a) No. This converion program did not convert the date properly.
A date in the oldmoves file that looks like this:
Tue Oct 1, 19:40 CDT 1996
...comes out in the PGN file like this:
[Date "????.10."]
...which is obviously completey incorrect.
(b) No. This program did not convert ANY of the games anywhere
NEAR what the output should be! However, it IS an old
program and is undoubtedly looking for a different format.
(c) No. If this program encounters the same date shown above...
Tue Oct 1, 19:40 CDT 1996
The date in the header comes out like this:
[Date "1996.10.1"]
...which is not quite correct either. Obviously in this
example it should come out like this:
[Date "1996.10.01"]
Also, the name of the player with the Black pieces comes out
ALL screwed up if that player does not have a rating!
Earlier you mentioned that you have a DOS batch file which you use
after logging off. Could I see a copy of that? ┌────────────────
────────────────────────────────────────────────┘
Sure! Here it is, REVIEW.BAT with appropriate comments.
┌───────────────────────────────────────────────────────────────┐
│@echo off │
│cls │
│ │
│rem I just logged off from FICS and I'd like to review the │
│rem last few games that I just played... │
│ │
│rem Copy the ZIICS oldmoves.log file to a specific temp │
│rem directory and rename it at the same time... │
│copy c:\chess\ziics131\oldmoves.log c:\chess\ca\temp\temp.log │
│ │
│rem Change to the directory where this conversion │
│rem program resides... │
│cd c:\chess\eds-old │
│ │
│rem Run my program. The options.txt file forces batch file │
│rem mode. It is set up to convert the temp.log file that │
│rem I just copied to my c:\chess\ca\temp directory... │
│eds-old.exe eds-old.opt │
│ │
│rem Now change to this Chess Assistant temp directory... │
│cd c:\chess\ca\temp │
│ │
│rem Run the conversion program supplied with Chess │
│rem Assistant which converts PGN files to a file │
│rem format that CA can read... │
│c:\chess\ca\pgn2ca temp.pgn │
│ │
│rem Change back to the Chess Assistant directory and run │
│rem Chess Assistant │
│cd.. │
│ca │
└───────────────────────────────────────────────────────────────┘
I think I found a bug. What should I do?
─────────────────────────────────────────
If you feel that the game can use improvements in any area, or more
importantly, if you do find any programming bugs, I would
appreciate it very much if you would let me know. Currently, my
e-mail address is...
ecollins@inficad.com
If this changes you can always finger me on FICS for my current
e-mail address.
You can also leave me a message on FICS if you like. My handle is
is, appropriately, 'EdCollins'.
If, by chance, the program happens to completely crash on you, it
is probably because if encountered an error in your input file
which I failed to account for. If this happens, take a look at
the results file (EDS-OLD.RSL) that it created. Make a note of
the last game that was conveted. The error is probably somewhere
in the NEXT game in the oldmoves.log file. Edit this file with an
editor to clean up the problem and then try converting the file
again.
Ideally, send me the portion of your oldmoves.log file that the
program is having problems with. I'd like to see it. The
program should never crash.
I'm curious. What language did you use write this program in?
──────────────────────────────────────────────────────────────
This program was written and compiled using Spectra Publishing's
PowerBASIC version 3.00c over a period of about 10 days.
(PowerBASIC is similar to QBASIC and Microsoft's Quick BASIC.)
I'm interested in reading more about PGN files. Got any ideas?
───────────────────────────────────────────────────────────────
You will probably wish to acquire a copy of the very informative
Portable Game Notation Specification
and
Implementation Guide
which will tell you everything you wanted to know and more! As of
this moment it can be found, among other places...
via ftp at
chess/onenet/net/pub/chess/pgn/standard
and
via the World Wide Web at
ourworld.compuserve.com/homepages/Manfred_Rosenboom/pgn_spec.htm
Edward D. Collins
October 24, 1996
Revisions
─────────
Version 1.1
The program crashed if it encountered an end result line which was
missing the second bracket. For example:
1. f4 (0:02) e5 (0:03)
2. g4 (0:02) Qh4 (0:01)
{White checkmated
} 1-0
Note that this is NOT the proper format for the oldmoves.log
file. However the program will no longer crash in cases like this.
( Documentation Version 1.1a )
──── end of file ────